/* 
 * File:   Texture.h
 * Author: RedEyedKiller
 *
 * Created on 20 Ιούλιος 2011, 7:45 πμ
 */

#ifndef TEXTURE_H
#define	TEXTURE_H

namespace gl
{

/**
 * Enumeration to specify the filtering to be used with a newly creatred texture.
 */
enum TexturingFilters
{
    TF_LINEAR,
    TF_NEAREAST,
    TF_ANISOTROPIC
};

class Texture
{
public:
    Texture();
    virtual ~Texture();
    
    /**
     * Loads the specified image and converts it into a texture.
     * @param filename
     * @return 
     */
    bool Load(const char* filename);
    
    /**
     * Pushes this texture into opengl state.
     */
    void Apply() const;
    
    /**
     * Returns the height of this texture.
     * @return 
     */
    unsigned int GetHeight() const;
    
    /**
     * Returns the width of this texture.
     * @return 
     */
    unsigned int GetWidth() const;
    
    /**
     * Returns the internal ID this texture has in the opengl texture array.
     * @return 
     */
    unsigned int GetID() const;
    
private:
    /**
     * The unique id generated by opengl to name this texture.
     */
    unsigned int ID;
    
    /**
     * The dimensions of this texture.
     */
    unsigned int width;
    unsigned int height;
};

};
#endif	/* TEXTURE_H */

